﻿@model TrialControllerModel.Detail
<div class="page">
    <div class="pageContent">
        <form method="POST" action="/game/trial/detail/@(Model.Trial.Id)?gameId=@(Model.Trial.GameId)" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
        <div class="pageFormContent">
            <div>
                <p>
                    <label>
                        游戏区服：
                    </label>
                    <select name="ServerId">
                        @foreach (var o in Model.Games)
                        {
                            <optgroup label="@o.Name">
                                @foreach (var i in o.Servers.Where(x => x.JoinTrial))
                                { 
                                    <option value ="@(i.Id)" @(Model.ServerId == i.Id ? "selected=selected" : string.Empty)>@(o.Name)--@i.Name</option>
                                }
                            </optgroup>
                        }
                    </select>
                </p>
                <p>
                    <label>
                        等 级：
                    </label>
                    <input type="text" name="Level" value="@(Model.Trial.Level)" class="required"/>
                </p>
                <p>
                    <label>
                        兑换积分：
                    </label>
                    <input type="text" name="Integral" value="@(Model.Trial.Integral)" class="required"/>
                </p>
            </div>
        </div>
        <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="button" onclick="this.form.onsubmit();">
                                保存</button></div>
                    </div>
                </li>
                <li>
                    <div class="button">
                        <div class="buttonContent">
                            <button type="button" onclick="$.pdialog.closeCurrent();">
                                取消</button></div>
                    </div>
                </li>
            </ul>
        </div>
        </form>
    </div>
</div>
